<?php
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\proxy_pay\models\ProxyPaySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

use yii\helpers\Url;

return [
    [
        'class' => 'kartik\grid\CheckboxColumn',
        'width' => '20px',
    ],
    [
        'class' => 'kartik\grid\SerialColumn',
        'width' => '30px',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'id',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'created_at',
        'format' => ['date', 'php:Y-m-d H:i:s'],
        'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE,
        'filterWidgetOptions' =>[
            'model'=>$searchModel,
            'attribute'=>'log_time',
            'presetDropdown'=>TRUE,
            'convertFormat'=>true,
            'pluginOptions'=>[
                'format'=>'Y-m-d',
                'opens'=>'left',
                'locale' => [
                    'cancelLabel' => 'Clear',
                    'format' => 'Y-m-d',
                ],
            ]
        ],
    ],
    [
        'class' => \common\components\grid\KEnumColumn::className(),
        'attribute' => 'status',
        'enum' => \common\models\ProxyPay::getStatus(),
    ],
    [
        'class' => 'kartik\grid\ActionColumn',
        'dropdown' => false,
        'vAlign' => 'middle',
        'urlCreator' => function ($action, $model, $key, $index) {
            return Url::to([$action, 'id' => $key]);
        },
        'viewOptions' => ['role' => 'modal-remote', 'title' => 'View', 'data-toggle' => 'tooltip'],
        'updateOptions' => ['role' => 'modal-remote', 'title' => 'Update', 'data-toggle' => 'tooltip'],
        'deleteOptions' => ['role' => 'modal-remote', 'title' => 'Delete',
            'data-confirm' => false, 'data-method' => false,// for overide yii data api
            'data-request-method' => 'post',
            'data-toggle' => 'tooltip',
            'data-confirm-title' => 'Are you sure?',
            'data-confirm-message' => 'Are you sure want to delete this item'],
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'company_code',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'unique_id',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'orderno',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'branchnm',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'accntno',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'accntnm',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'amount',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'other_data',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'post_data',
    ],
    [
        'class' => '\kartik\grid\DataColumn',
        'attribute' => 'resp_data',
    ],

];   